$def with (perm_records, perm_pages)

$var title: $_("[Admin Center] Site Permissions")

<div id="contentHead">
    $:render_template("admin/menu")
    <h1>$_("Site Permissions")</h1>
</div>

<div id="contentBody">

<div>
$_("Change the policy of who can edit the site.")
</div>

$ options = []
$ options.append(("/permission/open", "Anyone can edit"))
$ options.append(("/permission/loggedinusers", "Only loggedin users can edit"))
$ options.append(("/permission/restricted", "Only admins can edit"))

<form method="POST" class="olform">
    <div class="formElememnt">
        <div class="label">
            <label for="id_root">$_("Who can edit Open Library records?")</label>
            <span class="smaller lighter">$_("This applies to /authors/*, /books/* and /works/* records.")</span>
        </div>
        <div class="input">
            $:Dropdown("perm_records", options, id="id_root", value=perm_records).render()
        </div>
    </div>

    <div class="formElememnt">
        <div class="label">
            <label for="id_root">$_("Who can edit Open Library pages?")</label>
            <span class="smaller lighter">$_("This applies to /about/*, /help/*, /dev/*, /docs/* etc.")</span>
        </div>
        <div class="input">
            $:Dropdown("perm_pages", options, id="id_root", value=perm_pages).render()
        </div>
    </div>

    <div class="formElement bottom">
        <div class="input">
            <br>
            <button type="submit" name="_submit" title="$_('Update permissions')" class="larger">$_("Submit")</button>
            &nbsp;
            <a href="javascript:;" class="attn go-back-link">$_("Cancel")</a>
        </div>
    </div>
</form>

<div class="smaller lighter">
    $_("This updates "permission" and "child_permission" fields of /, /works, /books and /authors records in the database.")
</div>

</div>
